﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Drawing.Imaging;
using System.Drawing;


public partial class js_uploadify_uploadify : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Files.Count > 0)
        {

            string filepath = "../uploads/";

            for (int i = 0; i < Request.Files.Count; i++)
            {
                var file = Request.Files[i];

                string filename = System.IO.Path.GetExtension(file.FileName).ToLower();

                filename = Util.GetUniqueFilename(filepath, filename);

                // tenta salvar o arquivo
                file.SaveAs(filepath + filename);
            }
        }
    }
}